useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoStoreSales3im.bin')
		click('Edit1')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,0')
		select_menu('Fully Expand Tree')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,9')
		select_menu('Edit Record')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,1(true)')
		select('Table', 'cell:Show,2(true)')
		select('Table', 'cell:Show,3(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, true], [saleDate, false], [quantity, false], [price, false]]')
		select('Table', 'cell:Show,2(false)')
		select('Table', 'cell:Show,3(false)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, true], [saleDate, false], [quantity, true], [price, true]]')
		select('Table', 'cell:Show,1(false)')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,1')
		select_menu('Show Product Fields>>quantity')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,1(true)')
		select('Table', 'cell:Show,2(true)')
		select('Table', 'cell:Show,3(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Show Product Fields>>saleDate')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Show Product Fields>>quantity')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1]]')
##		select('Table', '')
		rightclick('Table', 'Data,2')
		select_menu('Show Product Fields>>price')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		select('Table', 'cell:Show,1(true)')
##		select('Table', 'false', 'Show,2')
		select('Table', 'cell:Show,2(false)')
##		select('Table', 'false', 'Show,3')
		select('Table', 'cell:Show,3(false)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, true], [saleDate, false], [quantity, false], [price, false]]')
		select('Table', 'cell:Show,1(false)')
##		select('Table', 'true', 'Show,2')
		select('Table', 'cell:Show,2(true)')
		select('Table', 'cell:Show,3(false)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table', 'false', 'Show,0')
		select('Table', 'cell:Show,0(false)')
##		select('Table', 'false', 'Show,1')
		select('Table', 'cell:Show,1(false)')
##		select('Table', 'false', 'Show,2')
		select('Table', 'cell:Show,2(false)')
		assert_p('Table', 'Content', '[[keycode, false], [saleDate, false], [quantity, false], [price, true]]')
		click('Go')
		assert_p('Table', 'Content', '[[price, 4, , -19000, -19000]]')
##		select('Table', '')

		rightclick('Table', 'Data,0')
		select_menu('Show Product Fields>>keycode')
		
		
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, true], [saleDate, false], [quantity, false], [price, true]]')
##		select('Table', 'true', 'Show,1')
		select('Table', 'cell:Show,1(true)')
##		select('Table', 'true', 'Show,2')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table', 'false', 'Show,0')
		select('Table', 'cell:Show,0(false)')
##		select('Table', 'false', 'Show,1')
		select('Table', 'cell:Show,1(false)')
##		select('Table', 'false', 'Show,2')
		select('Table', 'cell:Show,2(false)')
		click('Go')
		assert_p('Table', 'Content', '[[price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, false], [saleDate, false], [quantity, false], [price, true]]')
##		select('Table', 'true', 'Show,0')
		select('Table', 'cell:Show,0(true)')
##		select('Table', 'true', 'Show,1')
		select('Table', 'cell:Show,1(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [price, 4, , -19000, -19000]]')
##		select('Table', '')

		rightclick('Table', 'Data,1')
		select_menu('Show Product Fields>>quantity')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
		assert_p('Table', 'Content', '[[keycode, true], [saleDate, true], [quantity, true], [price, true]]')
##		select('Table', 'false', 'Show,0')
		select('Table', 'cell:Show,0(false)')
##		select('Table', 'false', 'Show,1')
		select('Table', 'cell:Show,1(false)')
##		select('Table', 'false', 'Show,2')
		select('Table', 'cell:Show,2(false)')
		click('Go')
		assert_p('Table', 'Content', '[[price, 4, , -19000, -19000]]')
		select_menu('Edit>>Show / Hide Fields')
##		select('Table', 'true', 'Show,0')
		select('Table', 'cell:Show,0(true)')
##		select('Table', 'true', 'Show,1')
		select('Table', 'cell:Show,1(true)')
##		select('Table', 'true', 'Show,2')
		select('Table', 'cell:Show,2(true)')
		click('Go')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
